import Layout from '@/layout'

const orderManage = {
  path: '/orderManage',
  component: Layout,
  redirect: '/orderManage/orderList',
  name: 'orderManage',
  meta: {
    title: '订单管理',
    icon: 'el-icon-s-order',
    roles: ['SYSTEM_USER', 'TENANT_USER', 'ORG_USER', 'INDIVIDUAL_USER']
  },
  children: [
    {
      path: '/orderManage/orderList',
      component: () => import('@/views/orderManage/orderList/index'),
      name: 'orderList',
      meta: { title: '订单列表', roles: ['SYSTEM_USER', 'TENANT_USER', 'ORG_USER', 'INDIVIDUAL_USER'] }
    },
    {
      path: '/orderManage/orderDetail',
      component: () => import('@/views/orderManage/orderDetail/index'),
      name: 'orderDetail',
      hidden: true,
      meta: { title: '订单详情', roles: ['SYSTEM_USER', 'TENANT_USER', 'ORG_USER', 'INDIVIDUAL_USER'] }
    },
    {
      path: '/orderManage/newOrders',
      component: () => import('@/views/orderManage/newOrders/index'),
      name: 'newOrders',
      meta: { title: '创建订单', roles: ['ORG_USER'] }
    },
    {
      path: '/orderManage/batchImport',
      component: () => import('@/views/orderManage/batchImport/index'),
      name: 'batchImport',
      meta: { title: '批量导入', roles: ['ORG_USER'] }
    },
    {
      path: '/orderManage/deliveryList',
      component: () => import('@/views/orderManage/deliveryList'),
      name: 'deliveryList',
      hidden: true,
      meta: { title: '派单', roles: ['SYSTEM_USER', 'ORG_USER', 'INDIVIDUAL_USER'] }
    },
    {
      path: '/orderManage/anewdeliveryList',
      component: () => import('@/views/orderManage/deliveryList/index'),
      name: 'anewdeliveryList',
      hidden: true,
      meta: { title: '重新派单', roles: ['SYSTEM_USER', 'ORG_USER', 'INDIVIDUAL_USER'] }
    },
    {
      path: '/orderManage/revampOrder',
      component: () => import('@/views/orderManage/newOrders/index'),
      name: 'revampOrder',
      hidden: true,
      meta: { title: '修改', roles: ['SYSTEM_USER', 'ORG_USER', 'INDIVIDUAL_USER'] }
    }
  ]
}
export default orderManage
